<h3>Danh sách sản phẩm</h3>
<table id='tableCart'>
<col width='5%'/>
<col width='10%'/>
<col width='20%'/>
<col width='15%'/>
<col width='15%'/>
<col width='15%'/>
<col width='5%'/>
<col width='15%'/>
<tr>
	<th>STT</th>
	<th>Mã sản phẩm</th>
	<th>Tên sản phẩm</th>	
	<th>Loại sản phẩm</th>
	<th>Nhà sản xuất</th>
	<th>Hình ảnh</th>	
	<th></th>
	<th></th>	
</tr>
<?php
if($rs):
$i = 0;
foreach($rs as $item):
$i++;
?>
<tr>
	<td><?php echo $i?></td>
	<td><?php echo h($item['Product']['product_code'])?></td>
	<td><?php echo h($item['Product']['name'])?></td>
	<td><?php echo h($item['Category']['name'])?></td>
	<td><?php echo h($item['Brand']['name'])?></td>
	<td>
	<?php echo $this->Html->image('/../upload_files/'.$item['Product']['photo_dir'].'/small_'.$item['Product']['photo'])?>
	</td>	
	<td style='text-align:center'><?php echo $item['Product']['del_flag']?'X':'O'?></td>
	<td>
	<?php echo $this->Html->link('Sửa',array('action'=>'edit','controller'=>'products',h($item['Product']['id'])),array('class'=>'btn'))?>
	<?php echo $this->Html->link('Xóa',array('action'=>'delete','controller'=>'products',h($item['Product']['id'])),array('class'=>'btn'),'Bạn có chắc là muốn xóa?')?>
	</td>
</tr>
<?php endforeach;?>
<?php else:?>
<tr><td colspan='7'>Không tìm thấy dữ liệu</td></tr>
<?php endif;?>
</table>
<?php echo $this->element('paging')?>